
//
//  promoteViewController.m
//  Edumap
//
//  Created by 辰领科技 on 16/7/18.
//  Copyright © 2016年 yuf. All rights reserved.
//

#import "promoteViewController.h"
#import "certificationViewController.h"
#import "CustomerInformationViewController.h"

@interface promoteViewController ()<UITextFieldDelegate>
@property (strong, nonatomic) IBOutlet UIView *navView;
@property (strong, nonatomic) IBOutlet UIScrollView *scroview;
@property (strong, nonatomic) IBOutlet UILabel *label;
@property (strong, nonatomic) IBOutlet UITextField *textField;

@end

@implementation promoteViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self initViewLayout];
}


- (void)initViewLayout {
    [self adaptiveViewLayout:self.view];
    [self adaptiveViewLayout:self.navView];
    [self adaptiveViewLayout:self.scroview];
    _scroview.contentSize = flexibleSize(CGSizeMake(320, 505), NO);
    
    self.label.layer.cornerRadius = 5*VerticalRatio();
    self.label.layer.borderColor = [UIColor colorWithWhite:0.902 alpha:1.000].CGColor;
    self.label.layer.borderWidth = 1;
    [self.textField setValue:[UIColor colorWithWhite:0.627 alpha:1.000]
                  forKeyPath:@"_placeholderLabel.textColor"];
    _textField.delegate = self;
}


- (IBAction)back:(id)sender {
    [self backBtn];
}
#pragma mark - 客户信息
- (IBAction)customer:(id)sender {
    UIStoryboard *secondStroyBoard = [UIStoryboard storyboardWithName:@"PersonalStoryboard" bundle:nil];
    UIViewController *page = [secondStroyBoard instantiateViewControllerWithIdentifier:@"CustomerInformation"];
    [[Common getNavigation]pushViewController:page];
}
#pragma mark - 实名认证
- (IBAction)certification:(id)sender {
    UIStoryboard *secondStroyBoard = [UIStoryboard storyboardWithName:@"PersonalStoryboard" bundle:nil];
    certificationViewController *page = [secondStroyBoard instantiateViewControllerWithIdentifier:@"certification"];
    
    page.certificationIdentifier = 1;
    
    [[Common getNavigation]pushViewController:page];
}


- (BOOL)textFieldShouldReturn:(UITextField *)textField{
    UIStoryboard *secondStroyBoard = [UIStoryboard storyboardWithName:@"PersonalStoryboard" bundle:nil];
    CustomerInformationViewController *page = [secondStroyBoard instantiateViewControllerWithIdentifier:@"CustomerInformation"];
    page.searchStr = textField.text;
    [[Common getNavigation]pushViewController:page];
    [self hideKeyBoard];

    return YES;
}

@end
